import axios from 'axios'

const ERROK = 0

function get(url) {
  return function (params) {
    return axios.get(url, {
      params
    }).then((res) => {
      const { errno, data } = res.data
      if (errno === ERROK) {
        return data
      }
    }).catch(() => { })
  }
}

export {
  get
}
